<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import = "com.xiaonei.model.*,com.xiaonei.DAO.*" %>
<%@ page import = "java.net.URLDecoder,java.net.URLEncoder" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SCHOOL</title>
</head>
<body>
<img alt="郑州大学图片" 
				src="/xiaonei1227/image/image.jpg"
				align="middle" width=1000px/>
<br>
<% 
	/*
	 在这个页面内需要实现的功能有:
	 	1.显示学校的图片以及logo（目前数据库没有这条信息）
	 	2.显示学校名字（school.name）[schoool-num]
	 	3.显示学子数量（uesr2.school,需要统计）
	 	4.显示帖子数量
	 		需要统计,post.account==user2.account&&user2.school==school.school_num&&school.name==""）
	 	5.显示学校所属地区
	 		post.school-->school.province
	 	6.被关注量
	 		需要统计user_school.school_num==post.school
	 	7.点击关注或者取消关注
	 		跟新数据库：user_school,根据
	 		
	 		
	 所以需要传入的参数包括：
	 	1.学校ID：school_Num
	 		school.school_num=user1.school_num&&user1.account=post.accoumt
	 	2.用户的ID，session里面。user.account。
	*/
	
%>
<%
	String temp = request.getParameter("num");
	int schoolNum =100;
	schoolNum=Integer.parseInt(temp);
	
	String	schoolName=null;
	SchoolsDAOImpl schoolsDAOImpl=new SchoolsDAOImpl(); 
	schoolName=schoolsDAOImpl.getSchoolName(schoolNum);
	out.print(""+schoolName+"");
	
%>

	<input type ="button" name = "attention" value ="关注" />

<%
	out.println("学校id:"+schoolNum);
	int schoolStudentCount=schoolsDAOImpl.schoolStudentCount(schoolNum);
	out.println("学子数量:"+schoolStudentCount);
	int userSchool=schoolsDAOImpl.userSchool(schoolNum);
	out.println("关注数:"+userSchool);
	String address=schoolsDAOImpl.schoolAddress(schoolNum);
%>
<a href="School.jsp"><%out.println("学校目录"); %></a>
<%
	out.println(address);
%>
</body>
</html>


